import { View } from '@tarojs/components'
import { AtSearchBar } from 'taro-ui'
import { Component } from 'react'
import './homeHeader.less'

export default class HomeHeader extends Component {
  constructor () {
    super(...arguments)
    this.state = {
      value: ''
    }
  }
  onChange (value) {
    this.setState({
      value: value
    })
  }
  render () {
    return (
      <View className='index'>
        <AtSearchBar
          placeholder='搜索国医堂'
          actionName='搜索'//点击搜索框跳出的按钮名字命名
          value={this.state.value}
          onChange={this.onChange.bind(this)}
          className='search-input'
        />
      </View>
    )
  }
}